use clap::{Parser, ValueEnum};

#[derive(Debug, ValueEnum, Clone)]
pub enum Mode {
    Ascending,
    Countdown,
    Clock,
}

#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct Cli {
    /// Start pause timer
    #[arg(short = 'p', long, default_value_t = false)]
    pub pause: bool,

    /// Mode
    #[arg(short = 'm', value_enum, long, default_value_t = Mode::Ascending)]
    pub mode: Mode,

    /// In Countdown mode, exit when done.
    #[arg(short = 'e', long, default_value_t = false)]
    pub exit_after_countdown: bool,

    /// Countdown seconds
    #[arg(required_if_eq("mode", "countdown"))]
    pub seconds: Option<u32>,
}
